import Vue from "vue";
import VueRouter from "vue-router";


Vue.use(VueRouter);

const routes = [
    {
        path: "/",
        component: () => import("../views/City")
    },
    {
        path: "/loin",
        component:()=>import("../views/Loin")
    },

    {
        path: "/sire",
        component: () => import("../views/Top2")
    },
    {
        path: "/index",
        component:()=>import("../views/Index")
    },
    {
        path: "/seek",
        component:()=>import("../views/Seek")
    },
    {
        path: "/indent",
        component:()=>import("../views/Indent")
    },

    {
        path: "/my",
        component:()=>import("../views/My"),

    },
    //我的
    {
      path: "/myuser",
      component:()=>import('../components/Myuser'),
        children:[
            {
                path:"username",
                component:()=>import("../components/Username")
            },
            {
                path:'changepassword',
                component:()=>import("../components/Changepassword")
            },
            {
                path:"shipping",
                component:()=>import("../components/Shipping"),
                children:[
                    {
                        path:"addshipp",
                        component:()=>import("../components/Addshipp"),
                        children:[
                            {
                                path:"addsite",
                                component:()=>import("../components/AddSite"),
                            }
                        ]
                    }
                ]
            },


        ]
    },
    //我的
    {
      path: "/hongbao",
      component:()=>import('../components/Benefit'),
        children:[
            {
                path: 'duihuan',
                component:()=>import('../components/Duihuan')
            },
            {
                path: 'youjiang',
                component:()=>import('../components/Commend')
            },
            {
                path: "hbHistory",
               component:()=>import('../components/Hbhistory')
            },
            {
                path: "hbdescription",
                component:()=>import('../components/HbDescription')
            }
        ]
    },
    {
      path:"/Download",
        component:()=>import('../components/Download')
    },
    {
        path:"/yver",
        component:()=>import("../components/Balance"),
        children: [
            {
                path:"hong",
                component:()=>import("../components/HbDescription")
            }
        ]
    },
    {
      path:"/jifen",
      component:()=>import("../components/Points"),
        children: [
            {
                path:"hong",
                component:()=>import("../components/HbDescription")
            }
        ]
    },
    {
        path:"/vip",
        component:()=>import('../components/Vipcard'),
        children: [
            {
                path: 'usercart',
                component:()=>import('../components/Usecart'),
            },
            {
                path:"Fapiao",
                component:()=>import('../components/Fapiao')
            }
        ]
    },

    {
        path: "/shoptype",
        component:()=>import('../views/Shoptype'),
    },
    {
      path:"/serve",
      component:()=>import("../components/Serve"),
        children:[
            {
                path: "servexiang",
                component:()=>import('../components/ServeXiang')
            }
        ]
    },
    {
        path: "/shopdetail",
        component:()=>import('../views/Shopdetail'),
        children: [{
            path: "appraise",
            component:()=>import("../components/Appraise")
        },
            {
                path: "xiangqing",
                components:{
                    xiangqing:()=>import('../components/xiangqing'),
                }
            },
            {
                path: "shophom",
                components:{
                    shophom:()=>import('../components/ShopHomeDetail'),
                },
                children:[
                    {
                        path:"shopsafe",
                        component:()=>import('../components/ShopSafe'),
                    }
                ]
            }
        ]
    },
    {
      path:"/close",
        component:()=>import('../views/Close'),
        children:[
            {
                path:"ddremarks",
                component:()=>import('../components/DDremarks'),
            },
            {
                path:"chooseAddress",
                component:()=>import('../components/chooseAddress'),
                children: [
                    {
                        path: "addshipp",
                        component:()=>import('../components/Addaddress'),
                        children: [
                            {
                                path: "addsite",
                                component:()=>import('../components/AddSite'),
                            }
                        ]
                    }
                ]
            }
        ]
    },
    // {
    //     path:"/ddremarks",
    //     component:()=>import('../components/DDremarks'),
    // },
    {
        path:"/ddpayment",
        component:()=>import('../components/DDpayment')
    },
    {
        path:"/xiangqing",
        component:()=>import('../components/xiangqing')
    },
    {
        path: "/indentxiangqing",
        component:()=>import("../views/Indentxiangqing")
    }


];

const router = new VueRouter({
    routes
});

export default router;
